<h2>Option Values</h2>
<table class="basic-table">
	<thead>
		<tr>
			<th>Name</th>
			<th>Display</th>
			<th>Action</th>
		</tr>
	</thead>
	<tbody>
		<% @option_type.option_values.each do |ov| %>
			<tr>
				<td><%=ov.name%></td>
				<td><%=ov.presentation%></td>
				<td>
				  <%= link_to_remote "Delete",
				                     :url => {:action => 'delete_option_value', :id=> @option_type, :option_value_id => ov},
				                     :before => "Element.show('ov_busy_indicator')", 
				                     :complete => "Element.hide('ov_busy_indicator')",
				                     :update => 'option-value-listing' %>
				</td>
			</tr>
		<% end %>
		<% if @option_type.option_values.empty? %>
			<tr>
				<td colspan="3">None Available.</td>
			</tr>
		<% end %>
	</tbody>
</table>
<% unless @option_type.new_record? %>
  <span id="new-ov-link">
	  <%= link_to_remote "New Option Value",
	                     :url => {:action => 'new_option_value', :id=> @option_type},
	                     :before => "Element.hide('new-ov-link');Element.show('ov_busy_indicator')", 
	                     :complete => "Element.hide('ov_busy_indicator');Element.hide('new-ov-link');",
	                     :update => 'new-option-value' %>
  </span>
	<%= image_tag "spinner.gif", :plugin=>"railscart", :style => "display:none", :id => 'ov_busy_indicator' %>
<% end %>
<br/>
<div id="new-option-value"></div>
<br/>